package com.dtf.admin.manage.web;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dtf.admin.manage.service.SysStaffBo;
import com.dtf.admin.manage.vo.SysStaff;
import com.github.pagehelper.PageInfo;

@RequestMapping(value="/SysStaff")
@RestController
public class SysStaffController {
	
	Log log = LogFactory.getLog(SysStaffController.class);
	
	@Autowired
	private SysStaffBo sysStaffBo;
	
	@RequestMapping(value="/querySysStaff/{pageNum}/{pageSize}")
	public PageInfo getCust(@PathVariable int pageNum,@PathVariable int pageSize) {
		return sysStaffBo.querySysStaff(pageNum, pageSize);
	}
	@RequestMapping(value="/findSysStaffVo/{staff_id}")
	public SysStaff findSysStaffVo(@PathVariable String staff_id){
		Map param = new HashMap();
		param.put("staff_id", staff_id);
		return sysStaffBo.findSysStaffVo(param);
	}
	
	@RequestMapping(value="/findSysStaffMap/{staff_id}")
	public Map findSysStaffMap(@PathVariable String staff_id){
		Map param = new HashMap();
		param.put("staff_id", staff_id);
		return sysStaffBo.findSysStaffMap(param);
	}
	
	@RequestMapping(value="/updateSysStaffName/{staff_id}/{staff_name}")
	public Map updateSysStaffName(@PathVariable String staff_id,@PathVariable String staff_name){
		Map param = new HashMap();
		param.put("staff_id", staff_id);
		param.put("staff_name", staff_name);
		return sysStaffBo.updateSysStaffName(param);
	}
	
}
